<%

Public Function Cripto(sString)

  Cripto = ""
  sDigito = ""
  
  If len(sString) = 5 then
  	 sString = sString & " " 
  ElseIf len(sstring) = 4 then
  	 sString = sString & "  "
  End If
  
  for n = 1 to 6
  	sDigito = Asc(Mid(sString,n,1))* n * 7
    sDigito = sDigito-(Int(sDigito/125)*125)
  	
  	if sDigito<33 then
  	  sDigito = CHR(sDigito+33)
  	else
  	  sDigito = CHR(sDigito)		
  	end If
  
    Cripto = Cripto + sDigito
  
  next

	Cripto = Replace(Cripto,"'","")
	
End Function

'Public Function Cripto(MXX)

'TX=""
'FOR N = 1 TO 6
'  MX = ASC(SUBS(MXX,N,1))*N*7
'  MX = MX-(INT(MX/125)*125)
'  MX = CHR(IIF(MX<33,MX+33,MX))
'  TX=TX+MX
'NEXT
'RETU TX

%>